-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: new go-libipfs/gateway API, deprecate Gateway.Writable #9616
Conversation
5eef1e8
to
d4152d6
Compare
d4152d6
to
ccd1e83
Compare
00e7f86
to
6e8f94d
Compare
6e8f94d
to
330175a
Compare
|
||
i.addUserHeaders(w) // ok, _now_ write user's headers. | ||
w.Header().Set("IPFS-Hash", p.Cid().String()) | ||
log.Debugw("CID created, http redirect", "from", r.URL, "to", p, "status", http.StatusCreated) |
Check failure
Code scanning / CodeQL
Log entries created from user input
w.Header().Set("IPFS-Hash", newcid.String()) | ||
|
||
redirectURL := gopath.Join(ipfsPathPrefix, newcid.String(), newPath) | ||
log.Debugw("CID replaced, redirect", "from", r.URL, "to", redirectURL, "status", http.StatusCreated) |
Check failure
Code scanning / CodeQL
Log entries created from user input
7e03f4c
to
72cf86c
Compare
497b038
to
f97dfb8
Compare
f97dfb8
to
82db057
Compare
82db057
to
3eb0053
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, merged ipfs/boxo#145 rebased and added some deprecation docs pointing people at ipfs/specs#375 (if they care).
(security warnings above are triggered by Gateway.Writable code that was moved out and back, not a blocker)
3eb0053
to
2a8c524
Compare
This PR updates the Gateway code to use the newer interface from
go-libipfs
(ipfs/boxo#145)..Gateway.Writable
changed frombool
toFlag
go-libipfs
gatewayApi
interface to match what is requested bygo-libipfs
go-libipfs
once feat(gateway): improve GO API interface, remove Writable API boxo#145 is merged.